package org.wattdepot.cli.commands;

/**
 * Processes the help command, and returns string.
 * 
 * @author Jarret Mizo, Shaun Ramento
 * 
 */
public class HelpCommand implements UserCommands {

  /**
   * Returns the help menu as a string.
   * 
   * @param args Nothing in this case.
   * @return The help menu as a string.
   */
  public String doCommand(String args) {
    String help =
        "help\n  This message\n" + "quit\n  Exits the system\n" + "sources\n"
            + "  Prints a table summarizing the public sources in the system, one per line.\n"
            + "summary {source} \n  Prints information about a single source.\n"
            + "sensordata {source} timestamp {timestamp}\n"
            + "  Prints information about a single sensor data instance.\n"
            + "dailysensordata {source} day {day}\n"
            + "  Prints a table listing all of the sensor data instances for the specified day.\n"
            + "power [generated|consumed] {source} timestamp {timestamp}\n"
            + "  Prints the power generated by the source at the given timestamp.\n"
            + "powerstats [generated|consumed] {source} day {day} sampling-interval {minutes} "
            + "statistic {max|min|average}\n"
            + "  Returns the maximum, minimum, or average power generated by the"
            + " source for the day.\n"
            + "total [carbon|energy] {source} day {day} sampling-interval {minutes}\n"
            + "  Returns the total amount of carbon (or energy) emitted by this source for"
            + " the given day.\n"
            + "chart power [generated|consumed] {source} {startday} {endday} "
            + "sampling-interval {minutes} file {file}\n"
            + "  Writes out an html file that will display a chart illustrating the carbon "
            + "or energy for the source over the interval.\n" + "fueltypes {source}\n"
            + "  Returns a table of fuels associated with this source.\n"
            + "totalpower {source} {timestamp} fuelType {fuelType}\n"
            + "  Returns the total power generated by the given fuel type.\n"
            + "carboncontent {source} {timestamp} sampling-interval {interval}\n"
            + "  Returns the total carbon that would be emitted by that source over "
            + "an hour at the rate occurring as of the timestamp.\n";
    return help;
  }
}
